package com.sensetime.bi.senselink.server.rtsp.server.processor.localfile.actions;

import com.sensetime.bi.senselink.server.constant.Constant;
import com.sensetime.bi.senselink.server.entity.RtspRequestMsg;
import com.sensetime.bi.senselink.server.util.StringUtils;
import io.netty.handler.codec.rtsp.RtspHeaderNames;
import io.netty.handler.codec.rtsp.RtspResponseStatuses;
import io.netty.handler.codec.rtsp.RtspVersions;


public class DescribeAction {
  private RtspRequestMsg request = null;

  public DescribeAction(RtspRequestMsg request) {
    this.request = request;
  }

  public String call() {
    return RtspVersions.RTSP_1_0.text() + StringUtils.SPACE + RtspResponseStatuses.OK.code() + Constant.CRLF +
            RtspHeaderNames.SERVER.toString() + ":" + "RtspServer" + Constant.CRLF +
            RtspHeaderNames.CSEQ + ":" + this.request.getCSEQ() + Constant.CRLF +
            RtspHeaderNames.CONTENT_LENGTH + ":" + "0" + Constant.CRLF;
  }
}
